import java.io.IOException;



public class TimeUtil {

	public static int transferCbxValue(String value) {
		int lastTime = 0;
		
		if("1分钟后".equals(value)){
			lastTime = 1;
		}else if("10 分后".equals(value)){
			lastTime = 10;
		}else if("20 分后".equals(value)){
			lastTime = 20;
		}else if("30 分后".equals(value)){
			lastTime = 30;
		}else if("40 分后".equals(value)){
			lastTime = 40;
		}else if("50 分后".equals(value)){
			lastTime = 50;
		}else if("1小时后".equals(value)){
			lastTime = 60;
		}
		
		return lastTime;
	}
	
	public static void closeWindows(){
		try {
			Process p = Runtime.getRuntime().exec("cmd /c shutdown -s -f");
			p.waitFor();
		} catch (IOException ex) {
			ex.printStackTrace();
		} catch (InterruptedException ex) {
			ex.printStackTrace();
		}
	}

}
